module.exports = (sequelize, DataTypes) => {
  const manager = sequelize.define('manager', {
    managerId: {
      type: DataTypes.STRING(50),
      primaryKey: true
    }, // 账号id不可重复
    email: DataTypes.STRING(50),
    phone: DataTypes.STRING(11),
    password: {
      type: DataTypes.STRING(50),
      allowNull: false
    },
    power: DataTypes.INTEGER,
    avatar: DataTypes.STRING,
    token: DataTypes.STRING(150),
    device: DataTypes.STRING(50),
    loginTime: DataTypes.DATE,
    outdateTime: DataTypes.DATE,
    disable: {
      type: DataTypes.BOOLEAN,
      defaultValue: false
    }
  })

  // manager.associate = (models) => {
  // }
  return manager
}
